package com.laowang.project.system.domain;

import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.laowang.framework.aspectj.lang.annotation.Excel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.*;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * 用户消息对象 my_template_message
 *
 * @author laowang
 * @date 2023-05-24
 */
@NoArgsConstructor
@Data
public class MyTemplateMessage implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * 消息ID
     */
    @ApiModelProperty(value = "id", required = false)
    private Integer id;

    /**
     * 消息类型
     */
    @Excel(name = "消息类型")
    @ApiModelProperty(value = "消息类型", required = false)
    private String type;

    /**
     * 信心内容
     */
    @NotBlank(message = "消息不能为空")
    @Excel(name = "信心内容")
    @ApiModelProperty(value = "信心内容", required = false)
    private String message;

    /**
     * 要发生给的用户
     */
    @Excel(name = "要发生给的用户")
    @ApiModelProperty(value = "要发生给的用户", required = false)
    @NotNull(message = "发送人不能为空")
    private Integer formId;

    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
    @ApiModelProperty(value = "创建时间", required = false)
    private Date ctime;

    /**
     * 更新时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd")
    @ApiModelProperty(value = "更新时间", required = false)
    private Date utime;

    /**
     * 发送状态 1=未发送 2=已发送
     */
    @Excel(name = "发送状态 1=未发送 2=已发送")
    @ApiModelProperty(value = "发送状态 1=未发送 2=已发送", required = false)
    private Integer status;

    /**
     * 删除标识,0未删除,1已删除
     */
    @Excel(name = "删除标识,0未删除,1已删除")
    @ApiModelProperty(value = "删除标识,0未删除,1已删除", required = false)
    private Integer isdel;

    /**
     * 接收用户
     */
    @Excel(name = "接收用户")
    @ApiModelProperty(value = "接收用户", required = false)
    @NotNull(message = "接收人不能为空")
    private Integer toUser;

    @Transient
    private Integer needPoint;

    @Transient
    private String nickname;
}
